﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FrameWork.Entity;
using Microsoft.ApplicationBlocks.Data;
using System.Data.SqlClient;

namespace FrameWork.web.Code
{
    public class MenuCs
    {

        public MenuCs()
        {
            Microsoft.ApplicationBlocks.Data.SqlHelper.connectionString = ConfigurationManager.AppSettings["MsSql"].ToString();
        }

		public DataTable getMenu(sys_User Sys_User)
		{
			SqlParameter[] sp=new SqlParameter[1]{
				new SqlParameter("@USERID",SqlDbType.Int),
			
			};
			//

			sp[0].Value=Sys_User.UserID;			
			sp[0].Direction=ParameterDirection.Input;


			try
			{
				DataSet ds=new DataSet();				
				ds=SqlHelper.ExecuteDataset(CommandType.StoredProcedure,"dbo.SYS_GETMENU",sp);
				DataTable dt=ds.Tables[0];			
				return dt;
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}

    }
}
